/*
 * $Author: isan.wong@gmail.com $
 * $Date: 2011-07-29 01:03:06 +0000 (Fri, 29 Jul 2011) $
 * $Rev: 13 $
 * $URL: http://capitalbio-smd.googlecode.com/svn/src/com/capitalbio/smd/gui/StatusBar.java $
 */

package com.capitalbio.smd.gui;

import java.awt.BorderLayout;
import java.awt.Font;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JTextArea;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;

/**
 * 主窗口底部的状态栏
 * @author Wang Lei
 */
public class StatusBar extends JPanel {
	private static final long serialVersionUID = 1L;
	
	JTextArea messageBox;
	JProgressBar progressBar;
	
	public StatusBar() {
		setLayout(new BorderLayout());
		setBorder(new EtchedBorder(EtchedBorder.LOWERED));
		
		messageBox = new JTextArea("");
		messageBox.setBorder(new EmptyBorder(1, 1, 1, 1));
		messageBox.setFont(new Font("Arial", Font.PLAIN, 11));
		messageBox.setEditable(false);
		messageBox.setBackground(getBackground());
		add(messageBox, BorderLayout.CENTER);
/*
		progressBar = new JProgressBar();

		JPanel eastPanel = new JPanel();
		eastPanel.setLayout(new BorderLayout());
		eastPanel.add(progressBar, BorderLayout.CENTER);
		
		add(eastPanel, BorderLayout.EAST);
*/		
		clearStatus();
    }
    
    /**
     * 清除状态栏信息
     * @param message
     */
    public void clearStatus() {
    	messageBox.setText("Ready");
    	/*
		progressBar.setStringPainted(false);
		progressBar.setIndeterminate(false);
		progressBar.setMaximum(1);
		progressBar.setValue(0);*/
    }

    public JTextArea getMessageBox() {
		return messageBox;
	}

	public JProgressBar getProgressBar() {
		return progressBar;
	}

}
